﻿@model Testicide.Models.Feature

@using (Ajax.BeginForm("AddEditRecord", "Feature", new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "proOrder" }))
{
    @Html.ValidationSummary(true)
    <fieldset>
        @if (ViewBag.IsUpdate == true)
        {
            @Html.HiddenFor(model => model.ID)
        }
        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Status)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Status)
            @Html.ValidationMessageFor(model => model.Status)
        </div>
        <p>
            @if (ViewBag.IsUpdate == false)
            {
                <br />
                <input type="submit" onclick="closedialog()" value="Save" id="btnSave" name="cmd" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" />
            }
            else
            {
                <div class="editor-label">
                    @Html.LabelFor(model => model.Date)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.Date)
                    @Html.ValidationMessageFor(model => model.Date)
                </div>
                <br />
                <input type="submit" onclick="closedialog()" value="Update" id="btnUpdate" name="cmd" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" />
            }
            <input type="button" value="Cancel" onclick="closedialog()" id="btncancel" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" />
        </p>
    </fieldset>
}
